﻿<%@ Page Title="" Language="C#" MasterPageFile="~/followerpart/followermaster.master" AutoEventWireup="true" CodeFile="SubsReports.aspx.cs" Inherits="companypart_SubsReports" meta:resourcekey="PageResource1"%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
     tr .tabbone4{
	 background-color:#028ac5;
	 font-size:11px;
	 line-height:20px;
	 font-family:Tahoma;
  	 color:#fff;
  	 text-align:right;
	
}
.adel4{
	background-color:#ededed;
	font-size:10px;
	color:#084f86;
	font-family:Tahoma;
	height:30px;
	text-align:  right;
}
         .zr3 {
	background-image:url('../images/button2.png');
	display:block;
	float:right;
	 padding: 0px 10px 0px 10px;
	height:21px;
	text-align:center;
	color:#fff;
	text-shadow:1px 1px 0px #003a5e;
	margin-right:2px;
	line-height:19px;
	font-weight:bold;
	text-decoration:none;
	font-family:Tahoma;
	font-size:12px;


}
.zr3:hover ,.zr3:active {
	background-image:url('../images/button2.png');
	text-shadow:1px 1px 0px #003a5e;
	background-position:0px -21px;
	
}
  .stylelabel3
       {
       	color:#064c66;
	 font-weight:bold;
	 direction:rtl;
	 text-align:right;
       	}
             .tab3{
	width:815px;
 direction:rtl;
 border:1px #ccc solid;
 border-radius:5px;
 }

tr .tabbone3{
	 background-color:#028ac5;
	 font-size:11px;
	 line-height:20px;
	 font-family:Tahoma;
  	 color:#fff;
  	 text-align:center;
	
}
 .req3
       {
           color:Red;
       } 
.adel3{
	background-color:#ededed;
	font-size:10px;
	color:#084f86;
	font-family:Tahoma;
	height:30px;
	text-align:  center;
}
.he3{
	background-color:#fff;
	padding:5px;
	font-family:Tahoma;
	font-size:14px;
	font-weight:bold;
}
.txt3
{
    border:1px solid black;
    }
        .jqmWindow {
    display: none;
    
    position: fixed;
    top: 17%;
    left: 50%;
    
    margin-left: -300px;
    width: 800px;
    
    background-color: #EEE;
    color: #333;
    border: 1px solid black;
    padding: 12px;
}

        .lok
     {
	display: none;
	color: red;
     }
        
     </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table dir="rtl">
    <tr>

        <td>
             
        </td>
        <td>
        <asp:Button  style="float:left; margin:5px" CssClass="zr3" ID="selectall" runat="server" Text="اختر الكل " 
                onclick="selectall_Click" ValidationGroup="care" meta:resourceKey="deall" />
          <asp:Button style="float:left; margin:5px"  CssClass="zr3" ID="deselectall" runat="server" Text="عدم اختيار الكل" 
                onclick="deselectall_Click" ValidationGroup="care"  meta:resourceKey="all" />
        </td>
 </tr>
<tr>
    
<td  colspan="2">             
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
                    DataSourceID="SqlDataSource1"  
                     OnRowCreated="GridView1_RowCreated"
                    AllowPaging="True" EnableModelValidation="True" 
        GridLines="None"  >
                    <PagerSettings FirstPageText="الاولى" LastPageText="الاخيرة"
                        NextPageText="التالى" PreviousPageText="السابق" />
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                               
                                    <table  class="tab3">
                                        <tr class="tabbone3">
                                            <td style="width:100px">
                                                <asp:Label ID="lblendofsubs" runat="server" Text="الكتاب/الدورية" meta:resourceKey="lblendofsubs"
                                                    />
                                            </td>
                                            
                                            
                                            <td style="width:100px">
                                                <asp:Label ID="lblpadfees" runat="server" Text="النشر" meta:resourceKey="lblpadfees"
                                                     />
                                            </td>
                                            
                                            <td style="width:60px">
                                                <asp:Label ID="lbltype" runat="server" Text="التردد" meta:resourceKey="lbltype"
                                                     />
                                            </td>
                                            <td style="width:200px">
                                                <asp:Label ID="lblissn" runat="server" Text="الرقم التعريفى" meta:resourceKey="lblissn"
                                                    />
                                            </td>
                                          <td style="width:100px">
                                                <asp:Label ID="lblstartofsubs" runat="server" Text="بداية الاشتراك" meta:resourceKey="lblsatrtsub"
                                                    />
                                            </td>
                                             <td style="width:100px">
                                                <asp:Label ID="Label1" runat="server" Text="نهاية الاشتراك" meta:resourceKey="lblendsub"
                                                     />
                                            </td>
                                             <td style="width:50px">
                                                <asp:Label ID="Label2" runat="server" Text="عدد النسخ" meta:resourceKey="lblcopyno"
                                                     />
                                            </td>
                                             <td style="width:50px">
                                                <asp:Label ID="Label3" runat="server" Text="قيمة النسخة" meta:resourceKey="lblpaidfees"
                                                     />
                                            </td>
                                            <td style="width:50px">
                                               <asp:Label ID="Label10" runat="server" Text="عرض" meta:resourceKey="lblshow" />
                                            </td>
                                            
                                        </tr>
                                    </table>
                               
                            </HeaderTemplate>
                            <ItemTemplate>
                                <table class="tab3">
                                    <tr class="adel3">
                                        <td style="width:100px">
                                            <asp:Label  ID="Label11" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("product"))) %>'
                                                 />
                                        </td>
                                        
                                       
                                        <td style="width:100px">
                                            <asp:Label  ID="paidfees" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("publisher"))) %>'
                                                 />
                                        </td>
                                        
                                        <td style="width:60px">
                                            <asp:Label  ID="Label12" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("freq"))) %>'
                                                 />
                                        </td>
                                        <td style="width:200px">
                                            <asp:Label  ID="Label13" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("issn"))) %>'
                                                />
                                        </td>
                                         <td style="width:100px">
                                            <asp:Label  ID="startofsub" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("startdate"))) %>'
                                                 />
                                        </td>
                                         <td style="width:100px">
                                            <asp:Label  ID="Label4" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("enddate"))) %>'
                                                 />
                                        </td>
                                         <td style="width:50px">
                                            <asp:Label  ID="Label5" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("copyno"))) %>'
                                                 />
                                        </td>
                                         <td style="width:50px">
                                            <asp:Label  ID="Label6" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("copyprice"))) %>'
                                                 />
                                              <td style="width:50px">
                                              <asp:LinkButton ID="aore" runat="server" AutoPostBack="true" OnClick="aore_Click" ToolTip='<%# String.Format("{0} , {1},{2}", Eval("mysub"), Eval("copyno"), Eval("copyprice")) %>' meta:resourceKey="detail" ></asp:LinkButton>
                               <asp:CheckBox runat="server" ID="chkAdd" ToolTip='<%# Eval("mysub")%>' ></asp:CheckBox> 
                                              </td>  
                                        </td>
                                        
                                      
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:TemplateField>
                   
                    </Columns>
                </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="select p.*,t.* ,t.id as mysub,f.* from frequencies f  INNER JOIN products p  ON (f.id = p.freq_id) INNER JOIN company_product t ON (t.product_id = p.id)   WHERE t.company_id = @company_id and t.enddate>getdate()">
        <SelectParameters>
        <asp:SessionParameter Name="company_id" SessionField="company_id"  Type="Int32" />
           <%-- <asp:QueryStringParameter Name="company_id" QueryStringField="company" 
                Type="Int32" />--%>
        </SelectParameters>
    </asp:SqlDataSource>
                
   </td>
</tr>
<tr>
<td colspan="2">
<div id="detail" runat="server" visible="false">
<table dir="rtl">
<tr>
<td> <asp:Label CssClass="stylelabel3"  ID="Label3" runat="server" Text="ماتم استلامة" meta:resourceKey="arrive" /></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</td>
<td> <asp:Label CssClass="stylelabel3"  ID="arrive" runat="server" Text=""  /></td>
</tr>
<tr>
<td> <asp:Label CssClass="stylelabel3"  ID="Label9" runat="server" Text="ثمن ماتم استلامه " meta:resourceKey="arriveprice" /></td>
<td></td>
<td> <asp:Label CssClass="stylelabel3"  ID="arriveprice" runat="server" Text=""  /></td>
</tr>
<tr>
<td> <asp:Label CssClass="stylelabel3"  ID="Label7" runat="server" Text="مالم يتم استلامة" meta:resourceKey="noarrive" /></td>
<td></td>
<td> <asp:Label CssClass="stylelabel3"  ID="noarrive" runat="server" Text=""  /></td>
</tr>
<tr>
<td> <asp:Label CssClass="stylelabel3"  ID="Label11" runat="server" Text="ثمن ما لم يتم استلامة" meta:resourceKey="noarriveprice" /></td>
<td></td>
<td> <asp:Label CssClass="stylelabel3"  ID="noarriveprice" runat="server" Text=""  /></td>
</tr>
</table>

</div>
</td>
</tr>
<tr>
                <td colspan="2" align="center"> 
                <asp:Button CssClass="zr3" ID="genreport" runat="server" Text="انشىء التقرير" 
            onclick="genreport_Click" meta:resourceKey="genreport" />
                </td>
                </tr>
</table>

</asp:Content>

